﻿{extend name="public:base" /}

{block name="content"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-content">
                    <form method="post">
                        <div class="box-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">配置标题</label>
                                <div class="col-sm-3">
                                    <input type="text" placeholder="请输入配置标题" class="form-control" name="title" value="{$info.title}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">配置标识</label>
                                <div class="col-sm-3">
                                    <input type="text" placeholder="请输入配置标识" class="form-control" name="name" value="{$info.name}">
                                    <span class="form-text m-b-none">用于C函数调用，只能使用英文且不能重复</span>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="form-group row"><label class="col-sm-1 col-form-label">配置类型</label>
                                <div class="col-sm-3">
                                    <select class="form-control m-b" name="type">
                                        <option value="1" {$info['type'] == 1 ? 'selected' : ''}>字符</option>
                                        <option value="2" {$info['type'] == 2 ? 'selected' : ''}>数字</option>
                                        <option value="3" {$info['type'] == 3 ? 'selected' : ''}>文本</option>
                                        <option value="4" {$info['type'] == 4 ? 'selected' : ''}>数组</option>
                                    </select>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="form-group row"><label class="col-sm-1 col-form-label">配置值</label>
                                <div class="col-sm-3">
                                    <textarea class="form-control" name="value" rows="8">{$info.value}</textarea>
                                    <span class="form-text m-b-none">如果配置类型为数组，请使用指定四种分隔符进行分隔（<span style="color: red">,  ，  ;  回车换行</span>）</span>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="form-group row"><label class="col-sm-1 col-form-label">配置分组</label>
                                <div class="col-sm-3">
                                    <select class="form-control m-b" name="group_id">
                                        {volist name=":cache('configGroup')" id="vo"}
                                        <option value="{$vo.id}" {$vo['id'] == $info['group_id'] ? 'selected' : ''}>{$vo.name}</option>
                                        {/volist}
                                    </select>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="form-group  row">
                                <label class="col-sm-1 col-form-label">排序</label>
                                <div class="col-sm-3">
                                    <input type="number" name="sort" class="form-control" placeholder="请输入排序" value="{$info.sort}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="form-group row"><label class="col-sm-1 col-form-label">配置详细说明</label>
                                <div class="col-sm-3">
                                    <textarea class="form-control" name="remark" rows="8">{$info.remark}</textarea>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <input type="hidden" name="id" value="{$info.id}" />

                        <div class="form-group row">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button type="button" class="btn btn-w-m btn-default back-page">返回</button>
                                <button type="button" class="btn btn-w-m btn-primary ajax-post">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

{/block}
